<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
        <title>Bug 7422</title>
        <script>
                if (window.testRunner)
                    testRunner.dumpAsText();
        </script>
</head>
        <frameset cols="400,*" rows="*" id="mainFrameset">
                <!-- Test for <a href='https://bugs.webkit.org/show_bug.cgi?id=7422' target='_top'> bug 7422</a>: setting a frame name to the same value resets it to a generated one." -->
                <frame frameborder="1" name="frame_1" id="frame_1" src="about:blank" />
                <frame frameborder="1" src="javascript:
                        
                        var oldName = window.parent.frames[0].name;
                        window.parent.frames[0].name = oldName;
                        if (window.parent.frames[0].name == oldName) {
                                console.log('SUCCESS');
                        } else {
                                console.log('FAILURE: ' + window.parent.frames[0].name);
                        }
                
                " />
        </frameset>
</html>
